.class public Lcom/netease/util/UtilConstants;
.super Ljava/lang/Object;
.source "UtilConstants.java"


# static fields
.field public static DIR_ASSETS_IMG:Ljava/lang/String; = null

.field public static DIR_SDCARD_BASE:Ljava/lang/String; = null

.field public static DIR_SDCARD_DOWNLOAD_IMG:Ljava/lang/String; = null

.field public static DIR_SDCARD_TMP_IMG:Ljava/lang/String; = null

.field private static final IMG_URL_PREFEX:Ljava/lang/String; = "http://oimagec%d.ydstatic.com/image?url="

.field public static NEED_IMG_URL_PREFEX:Z = false

.field public static final PARAM_SEPARATOR:Ljava/lang/String; = "|"

.field public static final PARAM_SEPARATOR1:Ljava/lang/String; = "$"

.field public static final SEPARATOR:Ljava/lang/String; = "/"

.field public static final UTF_8:Ljava/lang/String; = "utf-8"


# direct methods
.method static constructor <clinit>()V
    .locals 2

    .prologue
    .line 16
    const/4 v0, 0x0

    sput-boolean v0, Lcom/netease/util/UtilConstants;->NEED_IMG_URL_PREFEX:Z

    .line 24
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;

    move-result-object v1

    .line 25
    invoke-virtual {v1}, Ljava/io/File;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 26
    const-string v1, "/netease/"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    .line 24
    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/netease/util/UtilConstants;->DIR_SDCARD_BASE:Ljava/lang/String;

    .line 28
    new-instance v0, Ljava/lang/StringBuilder;

    sget-object v1, Lcom/netease/util/UtilConstants;->DIR_SDCARD_BASE:Ljava/lang/String;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, "netease_temp_pic/"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/netease/util/UtilConstants;->DIR_SDCARD_TMP_IMG:Ljava/lang/String;

    .line 30
    new-instance v0, Ljava/lang/StringBuilder;

    sget-object v1, Lcom/netease/util/UtilConstants;->DIR_SDCARD_BASE:Ljava/lang/String;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, "netease_down_pic/"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/netease/util/UtilConstants;->DIR_SDCARD_DOWNLOAD_IMG:Ljava/lang/String;

    .line 32
    const-string v0, "images/"

    sput-object v0, Lcom/netease/util/UtilConstants;->DIR_ASSETS_IMG:Ljava/lang/String;

    .line 7
    return-void
.end method

.method public constructor <init>()V
    .locals 0

    .prologue
    .line 7
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static getImgUrlPrefex()Ljava/lang/String;
    .locals 7

    .prologue
    .line 20
    const-string v0, "http://oimagec%d.ydstatic.com/image?url="

    const/4 v1, 0x1

    new-array v1, v1, [Ljava/lang/Object;

    const/4 v2, 0x0

    invoke-static {}, Ljava/lang/Math;->random()D

    move-result-wide v3

    const-wide/high16 v5, 0x4020

    mul-double/2addr v3, v5

    const-wide/high16 v5, 0x3ff0

    add-double/2addr v3, v5

    double-to-int v3, v3

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    aput-object v3, v1, v2

    invoke-static {v0, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method
